import { Effect, Option } from "effect";

// Function to validate weight and return an Option
const validateWeightOption = (
  weight: number,
): Effect.Effect<Option.Option<number>> => {
  if (weight >= 0) {
    // Return Some if the weight is valid
    return Effect.succeed(Option.some(weight));
  }
  // Return None if the weight is invalid
  return Effect.succeed(Option.none());
};
